<%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<sql:query var="rs" dataSource="jdbc/QASDB">
    select id, category, template from question
</sql:query>

<html>
    <head><title>Question Template List</title></head>
    <body bgcolor="white">
        <table width="100%" border="0">
            <tr>
                <td> 
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td><table width="100%" cellpadding="8" border="1px" bordercolor="#000000" cellspacing="0px" style="border-collapse:collapse">
                                    <c:forEach var="row" items="${rs.rows}">
                                        <form action="" method=post>
                                            <tr>
                                                <td style="text-align: right;"><input name="button" type="submit" value="Edit"></td>
                                                <td style="text-align: right;"><input name="button" type="submit" value="Delete" onClick="return confirm('Sure? The variable definition, relations, solutions for this question will be Deleted!')"></td>
                                            <input name="act" type="hidden">
                                            <input name="myid" type="hidden" value=${row.id}> 
                                            <td width="100%">${row.id}: [<b>${row.category}</b>]--${row.template}</td>
                                            </tr>
                                        </form><p>
                                        </c:forEach> 
                                </table></td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>



        </font>
    </body>
</html>

